KIE Scanner - 6.1.0.Final - not Loading LATEST kJAR

315 views
Skip to first unread message

Zaid Ahmed

unread,
May 7, 2015, 1:52:23 AM5/7/15
to drools...@googlegroups.com

I am working on Drolls 6.1.0.Final. And my LATEST assets are not getting loaded. We have created a kJar 1.0 with 5 rules in KIE-Workbench 6.1.0.Final. We start our application server with KContainer having ReleaseId(gtoup, Artifact , LATEST). Rules are firing. Now add another rule in workbench increment the kJar version 1.1 and perform build and deploy. After waiting for 5mins fire the rules in application, LATEST Version IS NOT downloaded in m2 local repo and old rules are getting fired. I even tries with setting maven's update policy as interval:1, but in vain.

KIE Scanner is only getting triggered if I manually change the latest version and last updated in metadata.xml in local m2 repo. In this case KIE Scanner loads the new rules.

Kindly let us know what needs to be done.

Similar Issue https://issues.jboss.org/browse/DROOLS-477says fixed in 6.1.0.BETA but it still exists in 6.1.0.Final version

Matteo Mortari

unread,
May 7, 2015, 4:14:25 AM5/7/15
to drools...@googlegroups.com
Ciao, I'm another Drools users. I have similar scenario, but imho you're confusing matters.
  • When your application loads, likely the KieContainer is leveraging your local Maven settings, which by side effects are setup to fetch a latest version from a (local?) Nexus or alternative maven repo, into your local maven repo.
    Similarly as you launch a mvn goal, it will eventually update support libraries into your local maven repo.
    Therefore if you have a new version of kjar it will be pulled from the Nexus into your *local* Maven repo in ~/.m2. Hence you have the latest/realease/updated version of kjar in the app, when your app starts

  • As your application is running, the KieScanner is monitoring your local Maven repo in ~/.m2.
    But you should NOT have the need to fiddle with metadata xml files.
    What i do for instance, I execute manually or schedule the following on command line:

     mvn dependency:get -Dartifact=com.acme:rulepackage:RELEASE --settings /myconfig/kie-maven-settings.xml

    That is example to fetch the most up-to-date release version from Nexus repo into local maven repo in ~/.m2. This will make the KieScanner indeed to see an update for the new version. 
    You don't need to pass necessarily the settings file, here reported just for completeness.
At least this is my experience, and works OK for me.
I'm not sure if it's the expected behavior of the *KieScanner*, but above setup for me is good because I have control about when/why the local maven repo is updated - and at times, is updated not from a Nexus repo on the network, but using mvn install.

At least, hope this helps
Ciao
MM
Reply all
Reply to author
Forward
0 new messages